package model
{
	public class CardStackVO
	{
		private static const NUM_SHUFFLES:int = 100;
		
		private var cardStack:Stack;
		
		public function CardStackVO()
		{
			this.newCardStack();
		}
		
		public function newCardStack():void
		{
			cardStack = new Stack();
			
			for (var naipe:int = 1; naipe <= 4; naipe++)
			{
				for (var num:int = 1; num <= 13; num++)
				{
					cardStack.push(new CardVO(naipe, num, num));
				}
			}
			
			for (var i:int = 0; i < NUM_SHUFFLES; i++) cardStack.randomSwap();
		}
		
		public function getCard():CardVO
		{
			return (cardStack.pop() as CardVO);
		}
	}
}